package com.archetype.schedule.config;

import com.cellulam.framework.core.auth.SimpleUserClient;
import com.cellulam.framework.core.auth.UserClient;
import com.cellulam.framework.core.rest.RestClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.TaskScheduler;
import org.springframework.scheduling.concurrent.ConcurrentTaskScheduler;

import java.util.concurrent.ScheduledThreadPoolExecutor;

@Configuration
public class ScheduleConfiguration {

    @Bean
    public UserClient userClient() {
        return SimpleUserClient.getInstance();
    }

    @Bean
    public TaskScheduler schedule(){
        return new ConcurrentTaskScheduler(new ScheduledThreadPoolExecutor(5));
    }
}
